package cn.migu.music.hangupsms.remote;

import cn.migu.music.hangupsms.common.config.CLSmsAuthInterceptor;
import cn.migu.music.hangupsms.model.CLSmsSendReq;
import cn.migu.music.hangupsms.model.CLSmsSendRsp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cl-sms-service", url = "${host.clSms}", configuration = { CLSmsAuthInterceptor.class })
public interface CLSmsFeignClient {

    /**
     * 创蓝文本短信接口
     * 
     * @param clSmsSendReq
     *            文本短信请求参数
     * @return 响应参数
     */
    @PostMapping(value = "${hangupsms.clSmsSetting.smsUrl}", headers = { "remote=cl-sms-service" })
    CLSmsSendRsp sendSms(@RequestBody CLSmsSendReq clSmsSendReq);

    /**
     * 创蓝视频短信接口
     * 
     * @param clSmsSendReq
     *            视频短信请求参数
     * @return 响应参数
     */
    @PostMapping(value = "${hangupsms.clSmsSetting.vmsUrl}", headers = { "remote=cl-sms-service" })
    CLSmsSendRsp sendVms(@RequestBody CLSmsSendReq clSmsSendReq);
}
